package com.qijian.maindata.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.qijian.common.annotation.Excel;
import com.qijian.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

import java.util.Date;

/**
 * 产成品库存对象 im_production_inv
 *
 * @author qijian
 * @date 2024-06-30
 */
@EqualsAndHashCode(callSuper = true)
@Data
@ToString
@TableName("im_production_inv")
public class ProductionInv extends BaseEntity {
    private static final long serialVersionUID = 1L;

    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "开工令id")
    @TableId
    private Long projectId;

    @ApiModelProperty(value = "状态v 1:待入库, 2已入库, 0已发运")
    private Long status;

    @Excel(name = "状态", sort = 40)
    @ApiModelProperty(value = "状态v 1:待入库, 2已入库, 0已发运")
    private String statusStr;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "验收时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "验收时间")
    private Date checkTime;

    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "工单管理人员")
    private Long checkUserId;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "入库时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss", sort = 50)
    @ApiModelProperty(value = "入库时间")
    private Date storeInTime;

    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "入库人员")
    private Long storeInUserId;

    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "工厂_字典")
    private Long factoryId;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "发运时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss", sort = 70)
    @ApiModelProperty(value = "入库时间")
    private Date deliveryTime;

    private Long deliveryUserId;

    @TableField(exist = false)
    private String projectMachineNo;

}
